home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / amiga utilities / communication / bbs / hydrabbsa8 / source / src.lha / test / sharedlib / mylib.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-08  |  688 b   |  37 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <exec/exec.h>
  5. #include <exec/types.h>
  6.  
  7. #include <clib/exec_protos.h>
  8. #include <clib/dos_protos.h>
  9.  
  10. #include <pragmas/exec_pragmas.h>
  11. #include <pragmas/dos_pragmas.h>
  12.  
  13. #include "common.h"
  14.  
  15. struct DosLibrary *DOSBase;
  16. struct ExecBase *SysBase;
  17.  
  18. struct Grow test;
  19.  
  20. int a=0;
  21.  
  22. void * __asm __saveds LIBblurgh(register __d1 int val)
  23. {
  24.   SysBase = *(struct ExecBase **) 4L;
  25.   if (DOSBase = (struct DosLibrary *) OpenLibrary ("dos.library", 0))
  26.   {
  27.  
  28.     a++;
  29.     test.i=10+a;
  30.     strcpy(test.string,"hello!");
  31.  
  32.     Write(Output(),"moocow\n",7);
  33.     if (DOSBase) CloseLibrary ((struct Library *) DOSBase);
  34.   }
  35.   return(&test);
  36. }
  37.